﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using eManager.Domain;

namespace eManager.web.Infrastructure
{
    public class DepartementDb :DbContext, IDepartementDataSource
    {
        public DepartementDb() :base("DefaultConnection")
        {
            
        }
        public DbSet<Employee> Employees { get; set; }
        public DbSet<Departement> Departements { get; set; }
        public void Save()
        {
            SaveChanges();
        }

        IQueryable<Employee> IDepartementDataSource.Employees
        {
            get {
                return Employees;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        IQueryable<Departement> IDepartementDataSource.Departements
        {
            get {
                return Departements;
            }
            set
            {
                throw new NotImplementedException();
            }
        }
    }
}